import 'package:flutter/material.dart';
import 'package:flutterdemo/animationdemos/animation_demo.dart';
import 'package:flutterdemo/animationdemos/heartbeat.dart';
import 'package:flutterdemo/animationdemos/notification_listener_demo.dart';
import 'package:flutterdemo/animationdemos/pie_chart_demo.dart';
import 'package:flutterdemo/animationdemos/scroller_demo.dart';
import 'animationdemos.dart';
import 'NotificationListenerAnimationDemo.dart';

class Animations extends StatefulWidget {
  Animations({Key key}) : super(key: key);

  _AnimationsState createState() => _AnimationsState();
}

class _AnimationsState extends State<Animations> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('布局'),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            title: Text('AnimationController'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => AnimationDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('NotificationListener'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) =>
                      NotificationListenerAnimationDemo(),
                ),
              );
            },
          ),
          ListTile(
            title: Text('HeartBeat'),
            onTap: () {
              Navigator.push(
                context,
                new MaterialPageRoute(
                  builder: (BuildContext context) => HeartBeat(),
                ),
              );
            },
          ),
          ListTile(
            title: Text("PieChartDemo"),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => PieChartDemo()));
            },
          ),
          ListTile(
            title: Text("AnimationDemos"),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => AnimationDemos()));
            },
          ),
          ListTile(
            title: Text("ScrollerDemo"),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => ScrollerDemo()));
            },
          ),
          ListTile(
            title: Text("NotificationListenerDemo"),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => NotificationListenerDemo()));
            },
          )
        ],
      ),
    );
  }
}
